﻿namespace ShapesExercise
{
    public class Triangle : Shape
    {
        public Triangle(double width, double height)
        {
            this.Width = width;
            this.Height = height;
        }

        internal double Width
        {
            get
            {
                return base.width;
            }

            private set
            {
                base.width = value;
            }
        }

        internal double Height
        {
            get
            {
                return base.height;
            }

            private set
            {
                base.height = value;
            }
        }

        internal override double CalculateSurface()
        {
            return (this.Height * this.Width) / 2;
        }
    }
}